﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SPerfMonitor
{
    class Detail : I_PerfDetails
    {
        public bool startAllowed { get; set; }
        public int CpuUsage { get; set; }
        public int RamUsage { get; set; }
        public double DDUsage { get; set; }

        public Detail()
        {
        }

        public Detail(bool Allowd, int Cpu, int Ram,int DD)
        {
            this.startAllowed = Allowd;
            this.CpuUsage = Cpu;
            this.RamUsage = Ram;
            this.DDUsage = DD;
        }

        public void isAllowedToStart()
        {
            if (CpuUsage > 90 && RamUsage > 90 && DDUsage < 1250000)
            {
                startAllowed = false;
            }
            else
            {
                startAllowed = true;
            }
        }
    }
}
